//
//  NSObject+TimeExt.h
//  CarService
//
//  Created by sixarm on 2018/5/3.
//  Copyright © 2018年 sixarm. All rights reserved.
//

#import <Foundation/Foundation.h>


/**
 *  处理倒计时停止的回调
 */
typedef void(^HandleStopCountdownBlock)(NSString *stopTime,BOOL type);
/**
 *  处理倒计时改变的回调
 */
typedef void(^HandleChangeCountdownBlock)(NSString *changeTime,BOOL type);

@interface NSObject (TimeExt)

/**
 *  GCD定时器（倒计时）
 *
 *  param   Timeout                         倒计时开始时间
 *  param   handleChangeCountdownBlock      倒计时时间改变回调
 *  param   handleStopCountdownBlock        倒计时时间停止回调
 */

+ (dispatch_source_t)queryGCDWithTimeout:(NSInteger)Timeout

              handleChangeCountdownBlock:(HandleChangeCountdownBlock)handleChangeCountdownBlock

                handleStopCountdownBlock:(HandleStopCountdownBlock)handleStopCountdownBlock;
@end
